OBJS=vector.cmo mc.cmo math.cmo rand.cmo
LIBS=libmcsl.cma

all: $(LIBS)

libmcsl.cma: $(OBJS)
	ocamlc -o $@ -a gmp.cma $(OBJS)

# Borland won't accept "%.cmo: %.ml" type targets, uses old fashioned suffix
# targets

rand.cmo: gmp.cmi rand.ml
	ocamlc -c rand.ml

.ml.cmo:
	ocamlc -c $<

.mli.cmi:
	ocamlc -c $<

.mly.mli:
	ocamlyacc $<

.mly.ml:
	ocamlyacc $<

.mll.ml:
	ocamllex $<

clean:
	-rm -f *.cmo *.cmi $(LIBS)

.SUFFIXES: .ml .mll .mly .mli .cmi .cmo

